package com.waylau.spring.boot.blog.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.Size;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotEmpty;


/**
 * 课程类
 * @author lenovo
 *
 */
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Course implements Serializable{//为了前台网络的传输,需要实现这个序列化接口

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)//表示其增长策略为自增长
	private Long id;//课程号号唯一标识

	@NotEmpty(message = "课程名不能为空")
	private String name;//课程名



	
	
}
